﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<form id="contactSupportForm" method="post">
<div class="faqs">
       <div class="why_l">
           <ul class="why_l_a">
              <li>Contact Support</li>
              <li><%= Html.ActionLink("FAQs", "Faqs", "Account")%></li>
              <li><%= Html.ActionLink("Feedback", "Feedback", "Account")%></li>
              <li></li>
           </ul>
       </div>
       <div class="faqs_right">
         <div class="faqs_right_box">
           <h1>Contact Support </h1>
           <p>Our Customer Support team is here to help you with any questions you may have. If you have any questions that are not covered on our Frequently Asked Questions page, please fill out and send the form below. </p>
           
         </div>
          
        <div class="feedback">
         <div class="feedback_box1"></div>
         <div class="feedback_box2">
           <div class="feedback_box2_a">
             <div class="feedback_box2_b">
              <div class="feedback_boxa"><label>Username:</label></div><div class="feedback_boxb"> 
               <%if (Session["User"] != null)
                 { %>
              <input name="name" type="text" readonly="readonly" value="<%=(Session["User"] as CognisessDA.User).Username %>" />
              <%}else{  %>
              <input name="name" type="text" value="" />
              <%} %>
              </div>
             </div>
             <div class="feedback_box2_b">
              <div class="feedback_boxa"><label>Email:<a>*</a></label></div><div class="feedback_boxb"> 
              <%if (Session["User"] != null)
                { %>
              <input name="email" type="text" readonly="readonly" value="<%=(Session["User"] as CognisessDA.User).Email %>" />
              <%}else{ %>
              <input name="email" type="text" value=""/>
              <%} %>
              </div>
             </div>
             <div class="feedback_box2_b">
              <div class="feedback_boxa"><label>Phone Number:</label></div><div class="feedback_boxb"> <input name="phoneNumber" type="text" /></div>
             </div>
              
             
             <div class="feedback_box2_b">
              <div class="feedback_boxa"><label>Description:</label></div><div class="feedback_boxb"><textarea name="Description" cols="" rows=""></textarea> </div>
             </div>
             <div class="feedback_box2_b">
              <div class="feedback_boxa"><label>Subject:<a>*</a></label></div><div class="feedback_boxb"><select name="subject"></select></div>
             </div>
             <div class="feedback_box3_b">
              <div class="feedback_boxa1"></div><div class="feedback_boxb1">
              <input type="image" src="../../Content/images/support_button.gif" /></div>
             </div>
           </div> 
         </div>
         <div class="feedback_box3"></div>
        
        
        </div>
       </div>
     </div>
     </form>
<style type="text/css">
        .error
        {
            text-align: left;
            color: Red;
        }
    </style>

    <script>
        $().ready(function() {
            $("#contactSupportForm").validate({
                rules: {
                    name: { required: true, rangelength: [5, 20] },
                    email: { required: true, email: true },
                    Description: { required: true, digits: true },
                    subject: { required: true, digits: true },
                    phoneNumber: { required: true }
                },
                messages: {
                    name: { required: "Please enter your UserName.", rangelength: "UserName must be in 6-12 between characters." },
                    email: { required: "Please enter your Email.", email: "Please enter a valid Email accounts" },
                    Description: { required: "Please select your Description."},
                    subject: { required: "Please select your Subject.", digits: "Please select your Subject." },
                    phoneNumber: { required: "Please enter your Comment." }
                },
                remote: {
                    url: "Account/contactSupportForm",
                    type: "post",
                    dataType: "json",
                    data: {
                        username: function() {
                            return $("#name").val();
                            return $("#email").val();
                            return $("#phoneNumber").val();
                            return $("#subject").val();
                            return $("#Description").val();
                        }
                    }
                }
            });
        });
        $.validator.setDefaults({
            submitHandler: function(form) { form.submit(); }
        });
    </script>
</asp:Content>
